<?php
    defined('_JEXEC') or die('Restricted Access');
    require_once(JPATH_COMPONENT_SITE.DS.'helpers'.DS.'image.class.php');
    require_once(JPATH_COMPONENT_ADMINISTRATOR.DS.'helper'.DS.'peliculas.config.class.php');
    
    global $Contratos_Config;
    $Contratos_Config = new ContratosConfig();
    $Contratos_Config->loadConfig();
    
    JTable::addIncludePath(JPATH_COMPONENT.DS.'tables');
    
    require_once(JPATH_COMPONENT.DS.'base_controller.php');
    require_once(JPATH_COMPONENT.DS.'base_view.php');
    
    if( $controller = JRequest::getWord('controller') ) { 
        $path = JPATH_COMPONENT.DS.'controllers'.DS.$controller.'.php'; 
        if (file_exists($path)) { 
        require_once $path; 
    } else { 
        $controller = ''; 
    } 
    
    $classname = 'ContratosController'.$controller;
    $controller = new $classname();
    
    $controller->execute(JRequest::getWord('task'));
    $controller->redirect();
 
    
?>